﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <meta name="keywords" content="@ViewBag.Keywords">
    <meta name="description" content="@ViewBag.Description">

    <link href="~/KMcss/bootstrap.css" rel="stylesheet" />
    <link href="~/KMcss/css.css" rel="stylesheet" />
    <link href="~/KMcss/phantrang.css" rel="stylesheet" />
    <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script>
        var pricev = 100000;
        $(function () {

            $("#slider").slider({
                value: pricev,
                min: 50000,
                max: 2000000,
                step: 10000,
                slide: function (event, ui) {
                    $("#amount").val(formatNumber(ui.value) + " Đ");
                }
            });
            $("#amount").val(formatNumber($("#slider").slider("value")) + " Đ");
        });

        function formatNumber(number) {
            number = number.toFixed(2) + '';
            x = number.split('.');
            x1 = x[0];
            x2 = x.length > 1 ? '.' + x[1] : '';
            var rgx = /(\d+)(\d{3})/;
            while (rgx.test(x1)) {
                x1 = x1.replace(rgx, '$1' + ',' + '$2');
            }
            return x1;
        }
        function formatNumber2(number) {
            var x1 = "0";
            x1 = number.replace(",", "").replace(",", "").replace(",", "").replace("Đ", "");
            return x1;
        }
        function formaturl(url) {
            url = url + "?";
            var x1 = url.split("?", 1);
            return x1;
        }
        $(document).ready(function () {
            $("#slider a").mouseup(function () {
                window.location.href = formaturl(document.URL) + "?q=" + $(".search-text").val() + "&price=" + formatNumber2($("#amount").val());
            });
            $(window).scroll(function () {

                if ($(window).scrollTop() > 80) {
                    $(".menu").addClass('hidden_header');
                }
                else {
                    $(".menu").removeClass('hidden_header');
                }
            });
        });

    </script>
    <script>
        $(document).ready(function () {
            $("#dl-menu").click(function (e) {
                e.preventDefault();
                $(".menucha").slideToggle();
            });
        });
    </script>
</head>
<body>

    <header>
        <div class="div-search">
            <div class="container">
                <div class="row">
                    <div class="col-md-3">
                        <div class="logo"><a href="/">Tìm Mua Khuyễn Mãi</a></div>
                    </div>
                    <div class="col-md-9">
                        @{Html.RenderAction("ViewSearch", "KhuyenMai");}
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="menu">
            <div class="container">
                @*logo menu*@
                @{Html.RenderAction("GetMenu", "LoaiKhuyenMai", new { Id = 0 });}

            </div>
            <div class="clear">

            </div>
        </div>

        <div class="clear">

        </div>
    </header>
    <div id="content">
        <div class="container">
            <div class="row" style="display:none">
                <div class="col-md-12">
                    <div class="slider">

                        @*<img src="images/slider.PNG" style="width:100%" />*@
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div id="float_tracker" class="bN">
                        <menu id="social_badges2">
                            <section class="social-badge">
                                <ul class="shares group">
                                    <li class="share facebook_like VERB_LIKE">
                                        <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&amp;width=150&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowtransparency="true"></iframe>
                                    </li>
                                    <li class="share facebook" data-type="facebook">
                                        <div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-type="button_count"></div>
                                    </li>
                                    <li class="share googleshare">
                                        <div class="g-plus" data-action="share" data-annotation="bubble" data-href="https://developers.google.com/+/web/share/?hl=vi"></div>
                                    </li>
                                    <li>
                                        <div class="g-plusone" data-href="https://developers.google.com/+/web/+1button/?hl=vi"></div>
                                    </li>


                                </ul>

                            </section>

                        </menu>
                        <menu id="social_badges">
                            <section class="social-badge">
                                <ul class="shares group">
                                    <li class="share facebook_like VERB_LIKE">
                                        <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&amp;width&amp;layout=box_count&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:65px;" allowtransparency="true"></iframe>
                                    </li>
                                    <li class="share facebook" data-type="facebook">
                                        <div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-type="box_count"></div>
                                    </li>
                                    <li class="share googleshare">
                                        <div class="g-plus" data-action="share" data-annotation="vertical-bubble" data-height="60" data-href="https://developers.google.com/+/web/share/?hl=vi"></div>
                                    </li>
                                    <li>
                                        <div class="g-plusone" data-size="tall" data-href="https://developers.google.com/+/web/+1button/?hl=vi"></div>
                                    </li>


                                </ul>

                            </section>

                        </menu>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    @{Html.RenderAction("GetMyKhuyenMai", "KhuyenMai", new { thanhpho = ViewBag.thanhpho });}
                </div>
                @RenderBody()
            </div>


        </div>
        <div class="clear"></div>
    </div>
    <footer>
        <div class="container">
            <div class="col-md-12">
                <div class="row fs">
                    <section class="col-md-3 ">
                        <h4>Giới thiệu</h4>
                        <ul>
                            <li><a href="#">Về chúng tôi</a></li>
                            <li><a href="#">Doanh nghiệp hợp tác</a></li>
                        </ul>
                    </section>
                    <section class="col-md-3">
                        <h4>Giúp đỡ</h4>
                        <ul>
                            <li><a href="#">Hướng dẫn mua hàng</a></li>
                            <li><a href="#">Hướng dẫn dẫn tìm kiếm</a></li>
                        </ul>
                    </section>
                    <section class="col-md-3">
                        <h4>Khuyễn mãi nổi bật</h4>
                        <ul>
                            <li><a href="#">Thời trang</a></li>
                        </ul>
                    </section>
                    <section class="col-md-3">
                        <h4>Thông tin liên hệ</h4>
                        <ul>
                            <li><a href="#">Facebook</a></li>
                            <li><a href="#">G+</a></li>
                        </ul>
                    </section>
                </div>
            </div>
            <div class="clear"></div>
        </div>

    </footer>
    <div id="fb-root"></div>

    <script>
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v2.0";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
    <!-- Đặt thẻ này sau thẻ chia sẻ cuối cùng. -->
    <script type="text/javascript">
        window.___gcfg = { lang: 'vi' };

        (function () {
            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
            po.src = 'https://apis.google.com/js/platform.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
        })();
    </script>
</body>
</html>